package com.zhehekeji.opsys.api.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

// Generated 2014-11-26 14:35:18 by Hibernate Tools 3.4.0.CR1

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * TblOrderLog generated by hbm2java
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "t_order_log")
public class TOrderLog extends MongoEntity implements java.io.Serializable {

    /**
     * serialVersionUID:TODO
     *
     * @since 1.0
     */
    private static final long serialVersionUID = 2533170702014781754L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID", length = 20, nullable = false, unique = true)
    private Long id;

    @Column(name = "ACCOUNT", length = 255, nullable = true)
    private String account;

    @Column(name = "PRODUCT_CODE", length = 64, nullable = true)
    private String productCode;

    @Column(name = "PRODUCT_NAME", length = 128, nullable = true)
    private String productName;

    @Column(name = "ACTION", length = 2, nullable = true)
    private Integer action;

    @Column(name = "TYPE", length = 11, nullable = true)
    private Integer type;

    @Column(name = "CP_CODE", length = 20, nullable = true)
    private Long cpCode;

    /**
     * 平台：华为 0：中兴 1
     */
    @Column(name = "PLATFORMTYPE", length = 2, nullable = true)
    private Integer platformType;

    /**
     * 当前页面标识
     */
    @Column(name = "PAGE_IDENTITY", length = 64, nullable = true)
    private String pageIdentity;

    /**
     * 当前页面名称
     */
    @Column(name = "PAGE_NAME", length = 500, nullable = true)
    private String pageName;

    /**
     * 省份标识
     */
    @Column(name = "PROVINCE_IDENTITY", length = 64, nullable = true)
    private String provinceIdentity;

    /**
     * 省份名称
     */
    @Column(name = "PROVINCE_NAME", length = 500, nullable = true)
    private String provinceName;

    /**
     * 上级页面来源标识
     */
    @Column(name = "PARENET_PAGE_IDENTITY", length = 64, nullable = true)
    private String parentPageIdentity;

    /**
     * 内容CODE
     */
    @Column(name = "CONTENT_CODE", length = 64, nullable = true)
    private String contentCode;

    /**
     * 内容名称
     */
    @Column(name = "CONTENT_NAME", length = 128, nullable = true)
    private String contentName;

    /**
     * 栏目CODE
     */
    @Column(name = "CATEGORY_CODE", length = 64, nullable = true)
    private String categoryCode;

    /**
     * 栏目名称
     */
    @Column(name = "CATEGORY_NAME", length = 128, nullable = true)
    private String categoryName;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATE_TIME", nullable = true)
    private Date createTime;

    @Column(name = "ORIG_PRICE", nullable = true)
    private Double origPrice;

    @Column(name = "PRICE", nullable = true)
    private Double price;

    @Column(name = "COME_FROM", length = 11, nullable = true)
    private Integer comeFrom;

    @Column(name = "RESOLUTION", length = 2, nullable = true)
    private Integer resolution;

    @Column(name = "AREA_ID", length = 64, nullable = true)
    private String areaId;

    @Column(name = "EPG_PLATFORM_TYPE", length = 2, nullable = true)
    private Integer epgPlatformType;

    @Column(name = "STB_TYPE", length = 255, nullable = true)
    private String stbType;
    
    /**
     * 运营商code
     */
    @Column(name = "OPERATOR_IDENTITY", length = 64, nullable = true)
    private String operatorIdentity;

    /**
     * 运营商name
     */
    @Column(name = "OPERATOR_NAME", length = 64, nullable = true)
    private String operatorName;
    
    @Column(name = "AREA_IDENTITY", length = 64, nullable = true)
    private String areaIdentity;
    
    @Column(name = "AREA_NAME", length = 64, nullable = true)
    private String areaName;
    
    @Column(name = "PTYPE", length = 2, nullable = true)
    private Integer ptype;//1:电竟产品 2:教育产品
    
    @Column(name = "ORDER_YEAR", length = 10, nullable = true)
    private String orderYear;

    @Column(name = "ORDER_MONTH", length = 20, nullable = true)
    private String orderMonth;

    @Column(name = "ORDER_DAY", length = 30, nullable = true)
    private String orderDay;

    @Column(name = "ORDER_MINUTE", length = 40, nullable = true)
    private String orderMinute;

    @Column(name = "ORDER_HOUR", length = 40, nullable = true)
    private String orderHour;

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        TOrderLog other = (TOrderLog) obj;
        if (id != null) {
            if (!id.equals(other.id)) {
                return false;
            }
        } else {
            if (other.id != null) {
                return false;
            }
        }
        return true;
    }

}
